package com.aspose.cells;

import java.util.Iterator;

public class ListColumnCollection extends CollectionBase {
   private ListObject b;

   ListColumnCollection(ListObject listObject) {
      this.b = listObject;
   }

   void a(int var1, ListColumn var2) {
      this.a.add(var1, var2);
   }

   void a(ListColumnCollection var1, CopyOptions var2) {
      for(int var3 = 0; var3 < var1.getCount(); ++var3) {
         ListColumn var4 = var1.get(var3);
         ListColumn var5 = new ListColumn(this);
         var5.a(var4, var2);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var5);
      }

   }

   public ListColumn get(int index) {
      return (ListColumn)this.a.get(index);
   }

   public ListColumn get(String name) {
      Iterator var2 = this.a.iterator();

      ListColumn var3;
      do {
         if (!var2.hasNext()) {
            return null;
         }

         var3 = (ListColumn)var2.next();
      } while(!com.aspose.cells.b.a.zv.b(var3.getName(), name));

      return var3;
   }

   int a() {
      int var1 = -1;

      for(int var2 = 0; var2 < this.getCount(); ++var2) {
         if (var1 < this.get(var2).o) {
            var1 = this.get(var2).o;
         }
      }

      return var1;
   }

   int a(String var1) {
      for(int var2 = 0; var2 < this.a.size(); ++var2) {
         ListColumn var3 = (ListColumn)this.a.get(var2);
         if (com.aspose.cells.b.a.zv.b(var3.getName(), var1)) {
            return var2;
         }
      }

      return -1;
   }

   boolean b() {
      for(int var1 = 0; var1 < this.getCount(); ++var1) {
         if (this.get(var1).getTotalsCalculation() != 0) {
            return true;
         }
      }

      return false;
   }

   void a(ListColumn var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   ListObject c() {
      return this.b;
   }
}
